package io;

import java.io.*;
import java.nio.charset.StandardCharsets;

public class PwDemo {
    public static void main(String[] args) throws FileNotFoundException {
        /*PrintWriter pw = new PrintWriter("pw.txt");
        pw.println("111111111111");
        pw.println("2222222");
        System.out.println("写出完毕");
        pw.close();*/
        FileOutputStream fos = new FileOutputStream("pw2.txt");
        OutputStreamWriter ows = new OutputStreamWriter(fos, StandardCharsets.UTF_8);
        BufferedWriter bw = new BufferedWriter(ows);
        PrintWriter pw = new PrintWriter(bw);
        pw.println("333333333330");
        pw.println("444444");
        System.out.println("写出完毕");
        pw.close();

    }
}
